import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/exam/execute/discover/page',
    method: 'get',
    params: query
  })
}
export function fetchListByObject(query) {
  return request({
    url: '/exam/execute/discover/pageByObject',
    method: 'get',
    params: query
  })
}

export function listProblemByProjectId(query) {
  return request({
    url: '/exam/execute/discover/listProblemByProjectId',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/exam/execute/discover',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/exam/execute/discover/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/exam/execute/discover/' + id,
    method: 'delete'
  })
}

export function getProblem(id) {
  return request({
    url: '/exam/execute/discover/getProblem/' + id,
    method: 'get'
  })
}

export function getByProjectId(id) {
  return request({
    url: '/exam/execute/discover/getByProjectId/' + id,
    method: 'get'
  })
}


export function putObj(obj) {
  return request({
    url: '/exam/execute/discover',
    method: 'put',
    data: obj
  })
}

export function submit(obj) {
  return request({
    url: '/exam/execute/discover/submit',
    method: 'post',
    data: obj
  })
}
